/*
 * Decompiled with CFR 0.150.
 * 
 * Could not load the following classes:
 *  cn.hutool.core.collection.CollUtil
 *  cn.hutool.core.util.ObjectUtil
 *  com.alibaba.fastjson.JSON
 *  de.felixroske.jfxsupport.FXMLController
 *  javafx.beans.value.ChangeListener
 *  javafx.beans.value.ObservableValue
 *  javafx.collections.FXCollections
 *  javafx.collections.ObservableList
 *  javafx.event.ActionEvent
 *  javafx.event.EventHandler
 *  javafx.fxml.FXML
 *  javafx.fxml.Initializable
 *  javafx.scene.Node
 *  javafx.scene.control.Alert
 *  javafx.scene.control.Alert$AlertType
 *  javafx.scene.control.Button
 *  javafx.scene.control.CheckBox
 *  javafx.scene.control.ScrollPane
 *  javafx.scene.control.TableCell
 *  javafx.scene.control.TableColumn
 *  javafx.scene.control.TableView
 *  javafx.scene.control.TextField
 *  javafx.scene.control.cell.PropertyValueFactory
 *  javafx.scene.input.KeyCode
 *  javafx.scene.input.KeyEvent
 *  javafx.scene.layout.VBox
 *  javafx.stage.Modality
 *  javafx.util.Callback
 *  org.springframework.beans.factory.annotation.Autowired
 *  org.springframework.util.CollectionUtils
 */
package com.gys.controller.baseSetting.saleSchedule;

import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.ObjectUtil;
import com.alibaba.fastjson.JSON;
import com.gys.GysApplication;
import com.gys.common.business.ProductSortSettingUtil;
import com.gys.common.data.HttpJson;
import com.gys.common.plugIn.searchTextField.SearchTextField;
import com.gys.common.util.CacheUtil;
import com.gys.common.util.CommonUtil;
import com.gys.controller.BaseController;
import com.gys.controller.baseSetting.saleSchedule.AddProductSortController;
import com.gys.controller.dataManger.ControllerManger;
import com.gys.controller.index.IndexController;
import com.gys.data.example.GetUserOutData;
import com.gys.data.productSortSetting.GetProductDetailOutData;
import com.gys.data.productSortSetting.GetProductInData;
import com.gys.data.productSortSetting.GetProductSortOutData;
import com.gys.data.productSortSetting.GetQueryProVoOutData;
import com.gys.data.productSortSetting.importProductExcelInData;
import com.gys.view.productSort.AddProductSortView;
import de.felixroske.jfxsupport.FXMLController;
import java.io.File;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.ResourceBundle;
import javafx.beans.value.ChangeListener;
import javafx.beans.value.ObservableValue;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.event.ActionEvent;
import javafx.event.EventHandler;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.Node;
import javafx.scene.control.Alert;
import javafx.scene.control.Button;
import javafx.scene.control.CheckBox;
import javafx.scene.control.ScrollPane;
import javafx.scene.control.TableCell;
import javafx.scene.control.TableColumn;
import javafx.scene.control.TableView;
import javafx.scene.control.TextField;
import javafx.scene.control.cell.PropertyValueFactory;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;
import javafx.scene.layout.VBox;
import javafx.stage.Modality;
import javafx.util.Callback;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.CollectionUtils;

@FXMLController
public class ProductSortSettingController
extends BaseController
implements Initializable {
    @FXML
    private ScrollPane scrollPane;
    @FXML
    private VBox vBox;
    @FXML
    private Button queryBtn;
    @FXML
    private TableColumn<GetProductSortOutData, String> gspgNameSort;
    @FXML
    private TableColumn<GetProductDetailOutData, String> gspgSpecs;
    @FXML
    private TableColumn<GetProductDetailOutData, String> gspgProId;
    @FXML
    private TableColumn<GetProductSortOutData, String> indexSort;
    @FXML
    private Button exportFileBtn;
    @FXML
    private Button addBtn;
    @FXML
    private Button editeBtn;
    @FXML
    private TextField gspgProNameParam;
    @FXML
    private TableColumn<GetProductSortOutData, CheckBox> checkBoxSort;
    @FXML
    private Button importFileBtn;
    @FXML
    private TableColumn<GetProductDetailOutData, String> gspgProName;
    @FXML
    private TableColumn<GetProductDetailOutData, String> indexDetail;
    @FXML
    private TableColumn<GetProductSortOutData, String> gspgIdSort;
    @FXML
    private TableView<GetProductSortOutData> sortInfo;
    @FXML
    private TableView<GetProductDetailOutData> detailInfo;
    @FXML
    private TableColumn<GetProductDetailOutData, String> gspgIdDetail;
    @FXML
    private TableColumn<GetProductSortOutData, String> gspgUpdateEmp;
    @FXML
    private TextField gspgNameParam;
    @Autowired
    private IndexController indexController;
    private ObservableList<GetProductSortOutData> sortObservableTableList = FXCollections.observableArrayList(new ArrayList());
    private ObservableList<GetProductDetailOutData> detailObservableTableList = FXCollections.observableArrayList(new ArrayList());
    List<String> words = new ArrayList<String>();
    Map<String, Object> otherMap = new HashMap<String, Object>();
    public GetProductSortOutData selectProSort;
    @Autowired
    private AddProductSortController addProductSortController;

    public void initialize(URL location, ResourceBundle resources) {
        this.scrollPane.setPrefWidth(this.getContentWidth());
        this.scrollPane.setPrefHeight(this.getContentHeight());
        this.vBox.setPrefWidth(this.getContentWidth());
        this.vBox.setPrefHeight(this.getContentHeight());
        this.sortInfo.setPrefWidth(this.getContentWidth());
        this.detailInfo.setPrefWidth(this.getContentWidth());
        ControllerManger.controllerMap.put(this.getClass().getSimpleName(), this);
    }

    @Override
    public void init() {
        this.indexController.scrollContentPane.setOnKeyReleased((EventHandler)new EventHandler<KeyEvent>(){

            public void handle(KeyEvent e) {
                if (e.getCode() == KeyCode.DELETE) {
                    ProductSortSettingController.this.delete();
                }
                e.consume();
            }
        });
        this.words.clear();
        this.otherMap.clear();
        this.selectProSort = null;
        this.gspgNameParam.clear();
        this.gspgProNameParam.clear();
        GetProductInData inData = new GetProductInData();
        List<GetQueryProVoOutData> proVoOutData = null;
        HttpJson httpJson = ProductSortSettingUtil.queryProVo(new HashMap<String, Object>());
        if (!httpJson.isSuccess()) {
            Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", httpJson.getMsg());
            alert.showAndWait();
            return;
        }
        proVoOutData = JSON.parseArray((String)httpJson.getMsg(), GetQueryProVoOutData.class);
        if (ObjectUtil.isNotEmpty(proVoOutData)) {
            proVoOutData.forEach(item -> {
                this.words.add(item.getProCode());
                this.otherMap.put(item.getProCode(), item);
            });
        }
        this.initSortTableView();
    }

    public TableView<GetProductSortOutData> initSortTableView() {
        GetProductInData inData = new GetProductInData();
        inData.setClientId(((GetUserOutData)CacheUtil.get("logInUser")).getClient());
        inData.setGspgProName(CommonUtil.getFuzzyParam(this.gspgProNameParam.getText()));
        inData.setGspgName(CommonUtil.getFuzzyParam(this.gspgNameParam.getText()));
        List dataList = null;
        HttpJson httpJson = ProductSortSettingUtil.querySort(CommonUtil.convertToMap(inData));
        if (httpJson.isSuccess()) {
            dataList = JSON.parseArray((String)httpJson.getMsg(), GetProductSortOutData.class);
        }
        this.sortObservableTableList.clear();
        if (ObjectUtil.isNotEmpty(dataList)) {
            this.sortObservableTableList = FXCollections.observableArrayList((Collection)dataList);
        }
        this.indexSort.setCellValueFactory((Callback)new PropertyValueFactory(this.indexSort.getId()));
        this.checkBoxSort.setCellValueFactory(cellData -> ((GetProductSortOutData)cellData.getValue()).getCheckBoxSort().getCustomCheckBox());
        this.initCheckBoxSort();
        this.bingSortTableCell();
        this.initColumCheckBox();
        if (ObjectUtil.isNotEmpty(this.sortObservableTableList)) {
            this.sortInfo.setItems(this.sortObservableTableList);
        }
        this.detailObservableTableList.clear();
        return this.sortInfo;
    }

    private void bingSortTableCell() {
        this.gspgIdSort.setCellValueFactory((Callback)new PropertyValueFactory(this.gspgIdSort.getId()));
        this.gspgNameSort.setCellValueFactory((Callback)new PropertyValueFactory(this.gspgNameSort.getId()));
        this.gspgUpdateEmp.setCellValueFactory((Callback)new PropertyValueFactory(this.gspgUpdateEmp.getId()));
    }

    public void initColumCheckBox() {
        this.sortInfo.getSelectionModel().selectedItemProperty().addListener((ChangeListener)new ChangeListener<GetProductSortOutData>(){

            public void changed(ObservableValue<? extends GetProductSortOutData> observable, GetProductSortOutData oldValue, GetProductSortOutData newValue) {
                if (CollUtil.isEmpty((Collection)ProductSortSettingController.this.sortObservableTableList)) {
                    return;
                }
                for (int i = 0; i < ProductSortSettingController.this.sortObservableTableList.size(); ++i) {
                    if (i == newValue.getIndexSort() - 1) {
                        ((GetProductSortOutData)ProductSortSettingController.this.sortObservableTableList.get(i)).getCheckBoxSort().setSelectStatus(true);
                    } else {
                        ((GetProductSortOutData)ProductSortSettingController.this.sortObservableTableList.get(i)).getCheckBoxSort().setSelectStatus(false);
                    }
                    ProductSortSettingController.this.showDetail(newValue.getIndexSort() - 1);
                }
            }
        });
    }

    public void initCheckBoxSort() {
        this.checkBoxSort.setCellFactory(col -> {
            TableCell<GetProductSortOutData, CheckBox> cell = new TableCell<GetProductSortOutData, CheckBox>(){

                protected void updateItem(CheckBox item, boolean empty) {
                    super.updateItem(item, empty);
                    this.setGraphic((Node)item);
                    if (item != null) {
                        item.setOnMouseClicked(col -> {
                            if (CollectionUtils.isEmpty((Collection)ProductSortSettingController.this.sortObservableTableList)) {
                                return;
                            }
                            int index = this.getIndex();
                            for (int i = 0; i < ProductSortSettingController.this.sortObservableTableList.size(); ++i) {
                                if (i == index) continue;
                                ((GetProductSortOutData)ProductSortSettingController.this.sortObservableTableList.get(i)).getCheckBoxSort().setSelectStatus(false);
                            }
                            ProductSortSettingController.this.showDetail(index);
                        });
                    }
                }
            };
            return cell;
        });
    }

    private void showDetail(int index) {
        if (((GetProductSortOutData)this.sortObservableTableList.get(index)).getCheckBoxSort().isSelected().booleanValue()) {
            this.selectProSort = (GetProductSortOutData)this.sortObservableTableList.get(index);
            GetProductInData inData = new GetProductInData();
            inData.setClientId(((GetUserOutData)CacheUtil.get("logInUser")).getClient());
            inData.setGspgId(((GetProductSortOutData)this.sortObservableTableList.get(index)).getGspgIdSort());
            List dataList = null;
            HttpJson httpJson = ProductSortSettingUtil.queryDetail(CommonUtil.convertToMap(inData));
            if (httpJson.isSuccess()) {
                dataList = JSON.parseArray((String)httpJson.getMsg(), GetProductDetailOutData.class);
            }
            this.initDetailTableView(dataList);
        } else {
            this.detailObservableTableList.clear();
            this.selectProSort = null;
        }
    }

    private TableView<GetProductDetailOutData> initDetailTableView(List<GetProductDetailOutData> dataList) {
        this.detailObservableTableList.clear();
        this.detailObservableTableList = FXCollections.observableArrayList(dataList);
        this.indexDetail.setCellValueFactory((Callback)new PropertyValueFactory(this.indexDetail.getId()));
        this.bingDetailTableCell();
        if (ObjectUtil.isNotEmpty(this.detailObservableTableList)) {
            this.detailInfo.setItems(this.detailObservableTableList);
        }
        return this.detailInfo;
    }

    private void bingDetailTableCell() {
        this.gspgIdDetail.setCellValueFactory((Callback)new PropertyValueFactory(this.gspgIdDetail.getId()));
        this.gspgProId.setCellValueFactory((Callback)new PropertyValueFactory(this.gspgProId.getId()));
        this.gspgProName.setCellValueFactory((Callback)new PropertyValueFactory(this.gspgProName.getId()));
        this.gspgSpecs.setCellValueFactory((Callback)new PropertyValueFactory(this.gspgSpecs.getId()));
    }

    @FXML
    void addAction() {
        this.addProductSortController.setTitleTemp("\u65b0\u589e\u5546\u54c1\u5206\u7c7b");
        this.addProductSortController.type = true;
        this.addProductSortController.init();
        GysApplication.showView(AddProductSortView.class, (Modality)Modality.APPLICATION_MODAL);
    }

    public boolean editSave() {
        List<Integer> indexList = this.getSelectIndex();
        if (ObjectUtil.isEmpty(indexList)) {
            Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", "\u8bf7\u9009\u62e9\u8bb0\u5f55");
            alert.showAndWait();
            return false;
        }
        ArrayList inData = new ArrayList();
        this.detailObservableTableList.forEach(item -> {
            if (!item.getGspgSourceProId().equals(item.getGspgProId())) {
                inData.add(item);
            }
        });
        if (ObjectUtil.isEmpty(inData)) {
            Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", "\u8bf7\u4fee\u6539");
            alert.showAndWait();
            return false;
        }
        HashMap<String, Object> param = new HashMap<String, Object>();
        param.put("productDetailOutData", inData);
        HttpJson httpJson = ProductSortSettingUtil.update(param);
        if (httpJson.isSuccess()) {
            this.detailInfo.setEditable(false);
            this.sortInfo.setEditable(false);
            Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", "\u66f4\u65b0\u6210\u529f");
            alert.showAndWait();
            return true;
        }
        Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", httpJson.getMsg());
        alert.showAndWait();
        return false;
    }

    @FXML
    void queryAction(ActionEvent event) {
        this.initSortTableView();
    }

    @FXML
    void exportFileAction(ActionEvent event) {
        CommonUtil.exportModelFile("\u5546\u54c1\u5206\u7c7b\u5bfc\u5165\u6a21\u677f", "/modelFile/productSortModelFile.xls");
    }

    @FXML
    void importFileAction(ActionEvent event) throws Exception {
        File file = CommonUtil.fileChooser();
        if (ObjectUtil.isEmpty(file)) {
            return;
        }
        List<importProductExcelInData> importExcelInData = CommonUtil.importExcel(file, 0, importProductExcelInData.class);
        if (ObjectUtil.isEmpty(importExcelInData)) {
            Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", "\u6ca1\u6709\u6709\u6548\u6570\u636e");
            alert.showAndWait();
            return;
        }
        GetUserOutData user = this.getLoginUser();
        HashMap<String, Object> param = new HashMap<String, Object>();
        param.put("importExcelInData", importExcelInData);
        param.put("user", user);
        param.put("clientId", ((GetUserOutData)CacheUtil.get("logInUser")).getClient());
        HttpJson httpJson = ProductSortSettingUtil.importExcel(param);
        if (!httpJson.isSuccess()) {
            Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", httpJson.getMsg());
            alert.showAndWait();
            return;
        }
        Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", "\u4fdd\u5b58\u6210\u529f");
        alert.showAndWait();
        this.initSortTableView();
    }

    public List<Integer> getSelectIndex() {
        ArrayList<Integer> ids = new ArrayList<Integer>();
        if (!CollectionUtils.isEmpty(this.sortObservableTableList)) {
            for (GetProductSortOutData i : this.sortObservableTableList) {
                if (!i.getCheckBoxSort().isSelected().booleanValue()) continue;
                ids.add(i.getIndexSort());
            }
        }
        return ids;
    }

    public void delete() {
        List<Integer> indexList = this.getSelectIndex();
        if (ObjectUtil.isEmpty(indexList)) {
            Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", "\u8bf7\u9009\u62e9\u8bb0\u5f55");
            alert.showAndWait();
            return;
        }
        ArrayList inData = new ArrayList();
        indexList.forEach(item -> {
            GetProductSortOutData data = (GetProductSortOutData)this.sortObservableTableList.get(item - 1);
            GetProductInData inDataParam = new GetProductInData();
            inDataParam.setClientId(data.getClientId());
            inDataParam.setGspgId(data.getGspgIdSort());
            inDataParam.setGspgName(data.getGspgNameSort());
            inData.add(inDataParam);
        });
        HashMap<String, Object> param = new HashMap<String, Object>();
        param.put("productInData", inData);
        HttpJson httpJson = ProductSortSettingUtil.delete(param);
        if (!httpJson.isSuccess()) {
            Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", httpJson.getMsg());
            alert.showAndWait();
        }
        this.initSortTableView();
    }

    @FXML
    void editeAction(ActionEvent event) {
        List<Integer> indexList = this.getSelectIndex();
        if (ObjectUtil.isEmpty(indexList)) {
            Alert alert = this.createAlert(Alert.AlertType.INFORMATION, "\u63d0\u793a\u4fe1\u606f", "\u8bf7\u9009\u62e9\u8bb0\u5f55");
            alert.showAndWait();
            return;
        }
        this.addProductSortController.setTitleTemp("\u4fee\u6539\u5546\u54c1\u5206\u7c7b");
        this.addProductSortController.type = false;
        this.addProductSortController.init();
        GysApplication.showView(AddProductSortView.class, (Modality)Modality.APPLICATION_MODAL);
    }

    public void searchTextFieldEdit(final TableColumn<GetProductDetailOutData, String> column) {
        column.setCellFactory(tc -> {
            TableCell<GetProductDetailOutData, String> cell = new TableCell<GetProductDetailOutData, String>(){

                protected void updateItem(String chuzhi, boolean empty) {
                    super.updateItem(chuzhi, empty);
                    if (empty) {
                        this.setGraphic(null);
                    } else {
                        GetProductDetailOutData data = (GetProductDetailOutData)ProductSortSettingController.this.detailObservableTableList.get(this.getIndex());
                        String defaultValue = data.getGspgProId();
                        ArrayList<String> otherCloum = new ArrayList<String>();
                        otherCloum.add(ProductSortSettingController.this.gspgProName.getId());
                        otherCloum.add(ProductSortSettingController.this.gspgSpecs.getId());
                        SearchTextField searchTextField = new SearchTextField(data, column.getId(), ProductSortSettingController.this.words, defaultValue, ProductSortSettingController.this.otherMap, otherCloum, ProductSortSettingController.this.detailInfo);
                        this.setGraphic((Node)searchTextField);
                    }
                }
            };
            return cell;
        });
    }

    @FXML
    private void reset() {
        this.gspgNameParam.clear();
        this.gspgProNameParam.clear();
    }

    public ScrollPane getScrollPane() {
        return this.scrollPane;
    }

    public VBox getVBox() {
        return this.vBox;
    }

    public Button getQueryBtn() {
        return this.queryBtn;
    }

    public TableColumn<GetProductSortOutData, String> getGspgNameSort() {
        return this.gspgNameSort;
    }

    public TableColumn<GetProductDetailOutData, String> getGspgSpecs() {
        return this.gspgSpecs;
    }

    public TableColumn<GetProductDetailOutData, String> getGspgProId() {
        return this.gspgProId;
    }

    public TableColumn<GetProductSortOutData, String> getIndexSort() {
        return this.indexSort;
    }

    public Button getExportFileBtn() {
        return this.exportFileBtn;
    }

    public Button getAddBtn() {
        return this.addBtn;
    }

    public Button getEditeBtn() {
        return this.editeBtn;
    }

    public TextField getGspgProNameParam() {
        return this.gspgProNameParam;
    }

    public TableColumn<GetProductSortOutData, CheckBox> getCheckBoxSort() {
        return this.checkBoxSort;
    }

    public Button getImportFileBtn() {
        return this.importFileBtn;
    }

    public TableColumn<GetProductDetailOutData, String> getGspgProName() {
        return this.gspgProName;
    }

    public TableColumn<GetProductDetailOutData, String> getIndexDetail() {
        return this.indexDetail;
    }

    public TableColumn<GetProductSortOutData, String> getGspgIdSort() {
        return this.gspgIdSort;
    }

    public TableView<GetProductSortOutData> getSortInfo() {
        return this.sortInfo;
    }

    public TableView<GetProductDetailOutData> getDetailInfo() {
        return this.detailInfo;
    }

    public TableColumn<GetProductDetailOutData, String> getGspgIdDetail() {
        return this.gspgIdDetail;
    }

    public TableColumn<GetProductSortOutData, String> getGspgUpdateEmp() {
        return this.gspgUpdateEmp;
    }

    public TextField getGspgNameParam() {
        return this.gspgNameParam;
    }

    public IndexController getIndexController() {
        return this.indexController;
    }

    public ObservableList<GetProductSortOutData> getSortObservableTableList() {
        return this.sortObservableTableList;
    }

    public ObservableList<GetProductDetailOutData> getDetailObservableTableList() {
        return this.detailObservableTableList;
    }

    public List<String> getWords() {
        return this.words;
    }

    public Map<String, Object> getOtherMap() {
        return this.otherMap;
    }

    public GetProductSortOutData getSelectProSort() {
        return this.selectProSort;
    }

    public AddProductSortController getAddProductSortController() {
        return this.addProductSortController;
    }

    public void setScrollPane(ScrollPane scrollPane) {
        this.scrollPane = scrollPane;
    }

    public void setVBox(VBox vBox) {
        this.vBox = vBox;
    }

    public void setQueryBtn(Button queryBtn) {
        this.queryBtn = queryBtn;
    }

    public void setGspgNameSort(TableColumn<GetProductSortOutData, String> gspgNameSort) {
        this.gspgNameSort = gspgNameSort;
    }

    public void setGspgSpecs(TableColumn<GetProductDetailOutData, String> gspgSpecs) {
        this.gspgSpecs = gspgSpecs;
    }

    public void setGspgProId(TableColumn<GetProductDetailOutData, String> gspgProId) {
        this.gspgProId = gspgProId;
    }

    public void setIndexSort(TableColumn<GetProductSortOutData, String> indexSort) {
        this.indexSort = indexSort;
    }

    public void setExportFileBtn(Button exportFileBtn) {
        this.exportFileBtn = exportFileBtn;
    }

    public void setAddBtn(Button addBtn) {
        this.addBtn = addBtn;
    }

    public void setEditeBtn(Button editeBtn) {
        this.editeBtn = editeBtn;
    }

    public void setGspgProNameParam(TextField gspgProNameParam) {
        this.gspgProNameParam = gspgProNameParam;
    }

    public void setCheckBoxSort(TableColumn<GetProductSortOutData, CheckBox> checkBoxSort) {
        this.checkBoxSort = checkBoxSort;
    }

    public void setImportFileBtn(Button importFileBtn) {
        this.importFileBtn = importFileBtn;
    }

    public void setGspgProName(TableColumn<GetProductDetailOutData, String> gspgProName) {
        this.gspgProName = gspgProName;
    }

    public void setIndexDetail(TableColumn<GetProductDetailOutData, String> indexDetail) {
        this.indexDetail = indexDetail;
    }

    public void setGspgIdSort(TableColumn<GetProductSortOutData, String> gspgIdSort) {
        this.gspgIdSort = gspgIdSort;
    }

    public void setSortInfo(TableView<GetProductSortOutData> sortInfo) {
        this.sortInfo = sortInfo;
    }

    public void setDetailInfo(TableView<GetProductDetailOutData> detailInfo) {
        this.detailInfo = detailInfo;
    }

    public void setGspgIdDetail(TableColumn<GetProductDetailOutData, String> gspgIdDetail) {
        this.gspgIdDetail = gspgIdDetail;
    }

    public void setGspgUpdateEmp(TableColumn<GetProductSortOutData, String> gspgUpdateEmp) {
        this.gspgUpdateEmp = gspgUpdateEmp;
    }

    public void setGspgNameParam(TextField gspgNameParam) {
        this.gspgNameParam = gspgNameParam;
    }

    public void setIndexController(IndexController indexController) {
        this.indexController = indexController;
    }

    public void setSortObservableTableList(ObservableList<GetProductSortOutData> sortObservableTableList) {
        this.sortObservableTableList = sortObservableTableList;
    }

    public void setDetailObservableTableList(ObservableList<GetProductDetailOutData> detailObservableTableList) {
        this.detailObservableTableList = detailObservableTableList;
    }

    public void setWords(List<String> words) {
        this.words = words;
    }

    public void setOtherMap(Map<String, Object> otherMap) {
        this.otherMap = otherMap;
    }

    public void setSelectProSort(GetProductSortOutData selectProSort) {
        this.selectProSort = selectProSort;
    }

    public void setAddProductSortController(AddProductSortController addProductSortController) {
        this.addProductSortController = addProductSortController;
    }

    public boolean equals(Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof ProductSortSettingController)) {
            return false;
        }
        ProductSortSettingController other = (ProductSortSettingController)o;
        if (!other.canEqual(this)) {
            return false;
        }
        ScrollPane this$scrollPane = this.getScrollPane();
        ScrollPane other$scrollPane = other.getScrollPane();
        if (this$scrollPane == null ? other$scrollPane != null : !this$scrollPane.equals(other$scrollPane)) {
            return false;
        }
        VBox this$vBox = this.getVBox();
        VBox other$vBox = other.getVBox();
        if (this$vBox == null ? other$vBox != null : !this$vBox.equals(other$vBox)) {
            return false;
        }
        Button this$queryBtn = this.getQueryBtn();
        Button other$queryBtn = other.getQueryBtn();
        if (this$queryBtn == null ? other$queryBtn != null : !this$queryBtn.equals(other$queryBtn)) {
            return false;
        }
        TableColumn<GetProductSortOutData, String> this$gspgNameSort = this.getGspgNameSort();
        TableColumn<GetProductSortOutData, String> other$gspgNameSort = other.getGspgNameSort();
        if (this$gspgNameSort == null ? other$gspgNameSort != null : !this$gspgNameSort.equals(other$gspgNameSort)) {
            return false;
        }
        TableColumn<GetProductDetailOutData, String> this$gspgSpecs = this.getGspgSpecs();
        TableColumn<GetProductDetailOutData, String> other$gspgSpecs = other.getGspgSpecs();
        if (this$gspgSpecs == null ? other$gspgSpecs != null : !this$gspgSpecs.equals(other$gspgSpecs)) {
            return false;
        }
        TableColumn<GetProductDetailOutData, String> this$gspgProId = this.getGspgProId();
        TableColumn<GetProductDetailOutData, String> other$gspgProId = other.getGspgProId();
        if (this$gspgProId == null ? other$gspgProId != null : !this$gspgProId.equals(other$gspgProId)) {
            return false;
        }
        TableColumn<GetProductSortOutData, String> this$indexSort = this.getIndexSort();
        TableColumn<GetProductSortOutData, String> other$indexSort = other.getIndexSort();
        if (this$indexSort == null ? other$indexSort != null : !this$indexSort.equals(other$indexSort)) {
            return false;
        }
        Button this$exportFileBtn = this.getExportFileBtn();
        Button other$exportFileBtn = other.getExportFileBtn();
        if (this$exportFileBtn == null ? other$exportFileBtn != null : !this$exportFileBtn.equals(other$exportFileBtn)) {
            return false;
        }
        Button this$addBtn = this.getAddBtn();
        Button other$addBtn = other.getAddBtn();
        if (this$addBtn == null ? other$addBtn != null : !this$addBtn.equals(other$addBtn)) {
            return false;
        }
        Button this$editeBtn = this.getEditeBtn();
        Button other$editeBtn = other.getEditeBtn();
        if (this$editeBtn == null ? other$editeBtn != null : !this$editeBtn.equals(other$editeBtn)) {
            return false;
        }
        TextField this$gspgProNameParam = this.getGspgProNameParam();
        TextField other$gspgProNameParam = other.getGspgProNameParam();
        if (this$gspgProNameParam == null ? other$gspgProNameParam != null : !this$gspgProNameParam.equals(other$gspgProNameParam)) {
            return false;
        }
        TableColumn<GetProductSortOutData, CheckBox> this$checkBoxSort = this.getCheckBoxSort();
        TableColumn<GetProductSortOutData, CheckBox> other$checkBoxSort = other.getCheckBoxSort();
        if (this$checkBoxSort == null ? other$checkBoxSort != null : !this$checkBoxSort.equals(other$checkBoxSort)) {
            return false;
        }
        Button this$importFileBtn = this.getImportFileBtn();
        Button other$importFileBtn = other.getImportFileBtn();
        if (this$importFileBtn == null ? other$importFileBtn != null : !this$importFileBtn.equals(other$importFileBtn)) {
            return false;
        }
        TableColumn<GetProductDetailOutData, String> this$gspgProName = this.getGspgProName();
        TableColumn<GetProductDetailOutData, String> other$gspgProName = other.getGspgProName();
        if (this$gspgProName == null ? other$gspgProName != null : !this$gspgProName.equals(other$gspgProName)) {
            return false;
        }
        TableColumn<GetProductDetailOutData, String> this$indexDetail = this.getIndexDetail();
        TableColumn<GetProductDetailOutData, String> other$indexDetail = other.getIndexDetail();
        if (this$indexDetail == null ? other$indexDetail != null : !this$indexDetail.equals(other$indexDetail)) {
            return false;
        }
        TableColumn<GetProductSortOutData, String> this$gspgIdSort = this.getGspgIdSort();
        TableColumn<GetProductSortOutData, String> other$gspgIdSort = other.getGspgIdSort();
        if (this$gspgIdSort == null ? other$gspgIdSort != null : !this$gspgIdSort.equals(other$gspgIdSort)) {
            return false;
        }
        TableView<GetProductSortOutData> this$sortInfo = this.getSortInfo();
        TableView<GetProductSortOutData> other$sortInfo = other.getSortInfo();
        if (this$sortInfo == null ? other$sortInfo != null : !this$sortInfo.equals(other$sortInfo)) {
            return false;
        }
        TableView<GetProductDetailOutData> this$detailInfo = this.getDetailInfo();
        TableView<GetProductDetailOutData> other$detailInfo = other.getDetailInfo();
        if (this$detailInfo == null ? other$detailInfo != null : !this$detailInfo.equals(other$detailInfo)) {
            return false;
        }
        TableColumn<GetProductDetailOutData, String> this$gspgIdDetail = this.getGspgIdDetail();
        TableColumn<GetProductDetailOutData, String> other$gspgIdDetail = other.getGspgIdDetail();
        if (this$gspgIdDetail == null ? other$gspgIdDetail != null : !this$gspgIdDetail.equals(other$gspgIdDetail)) {
            return false;
        }
        TableColumn<GetProductSortOutData, String> this$gspgUpdateEmp = this.getGspgUpdateEmp();
        TableColumn<GetProductSortOutData, String> other$gspgUpdateEmp = other.getGspgUpdateEmp();
        if (this$gspgUpdateEmp == null ? other$gspgUpdateEmp != null : !this$gspgUpdateEmp.equals(other$gspgUpdateEmp)) {
            return false;
        }
        TextField this$gspgNameParam = this.getGspgNameParam();
        TextField other$gspgNameParam = other.getGspgNameParam();
        if (this$gspgNameParam == null ? other$gspgNameParam != null : !this$gspgNameParam.equals(other$gspgNameParam)) {
            return false;
        }
        IndexController this$indexController = this.getIndexController();
        IndexController other$indexController = other.getIndexController();
        if (this$indexController == null ? other$indexController != null : !(this$indexController).equals(other$indexController)) {
            return false;
        }
        ObservableList<GetProductSortOutData> this$sortObservableTableList = this.getSortObservableTableList();
        ObservableList<GetProductSortOutData> other$sortObservableTableList = other.getSortObservableTableList();
        if (this$sortObservableTableList == null ? other$sortObservableTableList != null : !this$sortObservableTableList.equals(other$sortObservableTableList)) {
            return false;
        }
        ObservableList<GetProductDetailOutData> this$detailObservableTableList = this.getDetailObservableTableList();
        ObservableList<GetProductDetailOutData> other$detailObservableTableList = other.getDetailObservableTableList();
        if (this$detailObservableTableList == null ? other$detailObservableTableList != null : !this$detailObservableTableList.equals(other$detailObservableTableList)) {
            return false;
        }
        List<String> this$words = this.getWords();
        List<String> other$words = other.getWords();
        if (this$words == null ? other$words != null : !(this$words).equals(other$words)) {
            return false;
        }
        Map<String, Object> this$otherMap = this.getOtherMap();
        Map<String, Object> other$otherMap = other.getOtherMap();
        if (this$otherMap == null ? other$otherMap != null : !(this$otherMap).equals(other$otherMap)) {
            return false;
        }
        GetProductSortOutData this$selectProSort = this.getSelectProSort();
        GetProductSortOutData other$selectProSort = other.getSelectProSort();
        if (this$selectProSort == null ? other$selectProSort != null : !(this$selectProSort).equals(other$selectProSort)) {
            return false;
        }
        AddProductSortController this$addProductSortController = this.getAddProductSortController();
        AddProductSortController other$addProductSortController = other.getAddProductSortController();
        return !(this$addProductSortController == null ? other$addProductSortController != null : !(this$addProductSortController).equals(other$addProductSortController));
    }

    protected boolean canEqual(Object other) {
        return other instanceof ProductSortSettingController;
    }

    public int hashCode() {
        int PRIME = 59;
        int result = 1;
        ScrollPane $scrollPane = this.getScrollPane();
        result = result * 59 + ($scrollPane == null ? 43 : $scrollPane.hashCode());
        VBox $vBox = this.getVBox();
        result = result * 59 + ($vBox == null ? 43 : $vBox.hashCode());
        Button $queryBtn = this.getQueryBtn();
        result = result * 59 + ($queryBtn == null ? 43 : $queryBtn.hashCode());
        TableColumn<GetProductSortOutData, String> $gspgNameSort = this.getGspgNameSort();
        result = result * 59 + ($gspgNameSort == null ? 43 : $gspgNameSort.hashCode());
        TableColumn<GetProductDetailOutData, String> $gspgSpecs = this.getGspgSpecs();
        result = result * 59 + ($gspgSpecs == null ? 43 : $gspgSpecs.hashCode());
        TableColumn<GetProductDetailOutData, String> $gspgProId = this.getGspgProId();
        result = result * 59 + ($gspgProId == null ? 43 : $gspgProId.hashCode());
        TableColumn<GetProductSortOutData, String> $indexSort = this.getIndexSort();
        result = result * 59 + ($indexSort == null ? 43 : $indexSort.hashCode());
        Button $exportFileBtn = this.getExportFileBtn();
        result = result * 59 + ($exportFileBtn == null ? 43 : $exportFileBtn.hashCode());
        Button $addBtn = this.getAddBtn();
        result = result * 59 + ($addBtn == null ? 43 : $addBtn.hashCode());
        Button $editeBtn = this.getEditeBtn();
        result = result * 59 + ($editeBtn == null ? 43 : $editeBtn.hashCode());
        TextField $gspgProNameParam = this.getGspgProNameParam();
        result = result * 59 + ($gspgProNameParam == null ? 43 : $gspgProNameParam.hashCode());
        TableColumn<GetProductSortOutData, CheckBox> $checkBoxSort = this.getCheckBoxSort();
        result = result * 59 + ($checkBoxSort == null ? 43 : $checkBoxSort.hashCode());
        Button $importFileBtn = this.getImportFileBtn();
        result = result * 59 + ($importFileBtn == null ? 43 : $importFileBtn.hashCode());
        TableColumn<GetProductDetailOutData, String> $gspgProName = this.getGspgProName();
        result = result * 59 + ($gspgProName == null ? 43 : $gspgProName.hashCode());
        TableColumn<GetProductDetailOutData, String> $indexDetail = this.getIndexDetail();
        result = result * 59 + ($indexDetail == null ? 43 : $indexDetail.hashCode());
        TableColumn<GetProductSortOutData, String> $gspgIdSort = this.getGspgIdSort();
        result = result * 59 + ($gspgIdSort == null ? 43 : $gspgIdSort.hashCode());
        TableView<GetProductSortOutData> $sortInfo = this.getSortInfo();
        result = result * 59 + ($sortInfo == null ? 43 : $sortInfo.hashCode());
        TableView<GetProductDetailOutData> $detailInfo = this.getDetailInfo();
        result = result * 59 + ($detailInfo == null ? 43 : $detailInfo.hashCode());
        TableColumn<GetProductDetailOutData, String> $gspgIdDetail = this.getGspgIdDetail();
        result = result * 59 + ($gspgIdDetail == null ? 43 : $gspgIdDetail.hashCode());
        TableColumn<GetProductSortOutData, String> $gspgUpdateEmp = this.getGspgUpdateEmp();
        result = result * 59 + ($gspgUpdateEmp == null ? 43 : $gspgUpdateEmp.hashCode());
        TextField $gspgNameParam = this.getGspgNameParam();
        result = result * 59 + ($gspgNameParam == null ? 43 : $gspgNameParam.hashCode());
        IndexController $indexController = this.getIndexController();
        result = result * 59 + ($indexController == null ? 43 : ($indexController).hashCode());
        ObservableList<GetProductSortOutData> $sortObservableTableList = this.getSortObservableTableList();
        result = result * 59 + ($sortObservableTableList == null ? 43 : $sortObservableTableList.hashCode());
        ObservableList<GetProductDetailOutData> $detailObservableTableList = this.getDetailObservableTableList();
        result = result * 59 + ($detailObservableTableList == null ? 43 : $detailObservableTableList.hashCode());
        List<String> $words = this.getWords();
        result = result * 59 + ($words == null ? 43 : ($words).hashCode());
        Map<String, Object> $otherMap = this.getOtherMap();
        result = result * 59 + ($otherMap == null ? 43 : ($otherMap).hashCode());
        GetProductSortOutData $selectProSort = this.getSelectProSort();
        result = result * 59 + ($selectProSort == null ? 43 : ($selectProSort).hashCode());
        AddProductSortController $addProductSortController = this.getAddProductSortController();
        result = result * 59 + ($addProductSortController == null ? 43 : ($addProductSortController).hashCode());
        return result;
    }

    public String toString() {
        return "ProductSortSettingController(scrollPane=" + this.getScrollPane() + ", vBox=" + this.getVBox() + ", queryBtn=" + this.getQueryBtn() + ", gspgNameSort=" + this.getGspgNameSort() + ", gspgSpecs=" + this.getGspgSpecs() + ", gspgProId=" + this.getGspgProId() + ", indexSort=" + this.getIndexSort() + ", exportFileBtn=" + this.getExportFileBtn() + ", addBtn=" + this.getAddBtn() + ", editeBtn=" + this.getEditeBtn() + ", gspgProNameParam=" + this.getGspgProNameParam() + ", checkBoxSort=" + this.getCheckBoxSort() + ", importFileBtn=" + this.getImportFileBtn() + ", gspgProName=" + this.getGspgProName() + ", indexDetail=" + this.getIndexDetail() + ", gspgIdSort=" + this.getGspgIdSort() + ", sortInfo=" + this.getSortInfo() + ", detailInfo=" + this.getDetailInfo() + ", gspgIdDetail=" + this.getGspgIdDetail() + ", gspgUpdateEmp=" + this.getGspgUpdateEmp() + ", gspgNameParam=" + this.getGspgNameParam() + ", indexController=" + this.getIndexController() + ", sortObservableTableList=" + this.getSortObservableTableList() + ", detailObservableTableList=" + this.getDetailObservableTableList() + ", words=" + this.getWords() + ", otherMap=" + this.getOtherMap() + ", selectProSort=" + this.getSelectProSort() + ", addProductSortController=" + this.getAddProductSortController() + ")";
    }
}

